<template>
  <el-form-item v-bind="props">
    <slot />
    <template #label v-if="$slots.label">
      <slot name="label"></slot>
    </template>
  </el-form-item>
</template>

<script setup>
import { computed, useAttrs } from 'vue';

defineOptions({
  name: 'AxiomFormItem'
});

const ownProps = defineProps({
  label: {
    type: String,
    default: '',
  },
  prop: {
    type: String,
  },
});

const attrs = useAttrs();

const props = computed(() => ({
  ...attrs,
  label: ownProps.label,
  prop: ownProps.prop,
}));
</script> 